The present invention relates to one-time programmable memory cards and to an improved method for accessing data files stored on such memory cards.
Digital cameras, such as the Kodak DC 4800 camera, capture images of a scene using a solid state image sensor, and store the resulting image data on a solid-state memory card, such as a compact flash card, which uses Flash EPROM memory. The card can be removed from the camera, and inserted into a card reader, so that the images can be transferred from the card to a personal computer. The card can then be erased and reused. The DOS-FAT system is normally used to store and retrieve the image files stored on Flash EPROM memory cards. Unfortunately, the cost of Flash EPROM memory is relatively high, and therefore such erasable memory cards are expensive. Various technologies have been developed to produce write-once memory. Once example is described in U.S. Pat. Nos. 6,034,882 and 6,185,122. These write-once memory technologies offer significantly reduced cost, compared to Flash EPROM memory chips.
When personal computers were first introduced, a disc operating system or DOS was needed to access data from floppy discs and hard drives. This platform became ubiquitous and subsequent advancements on disc operating system still maintained backwards compatibility. With the advent of new devices such as removable memory cards, the most compatible method with existing host systems that already have DOS, was to make the device""s file system compatible with the DOS file structure commonly known as the FAT file system. The FAT system is documented in ISO/IEC 9293, xe2x80x9cInformation technologyxe2x80x94Volume and file structure of disk cartridges for information interchangexe2x80x9d.
DOS""s structure includes a boot record, which is 1 sector (512 bytes) long, 2 File Allocation Tables (original and a back up FAT), a root directory, and the user data area. The FAT""s size is determined by an algorithm as a function of the number of sectors on the medium, the number of entries in the root directory amongst other variables. The number of entries in the FAT is equal to the number of clusters on the storage device.
Each entry in the FAT is either 12, 16, or 32 bits depending on the format of the volume. Since each entry represents the location of a segment of a file, the number of maximum addressable space or cluster is 2{circumflex over ( )}12, 2{circumflex over ( )}16, or {circumflex over ( )}32. Each cluster can be even binary multiples of sectors.
The root directory following the FAT contains the names of the files or folders and has a pointer to the first cluster of the named file or folder. The root directory consists of entries of 32 bytes for each file name and the number of the first cluster associated with the file. The remainder of the unused directory space is filled with 0""s.
At the same time, the FAT file system updates a FAT entry at an offset equal to the starting cluster of the file. The content of the entry is either all 1""s to indicate the last cluster used by the file or a non-zero number to indicate the cluster location of the next portion of the file or folder. With this technique, the FAT maps the cluster location of any particular file or folder. Again the last cluster used by a file or folder is indicated by all 1""s. A FAT entry with all 0""s would indicate a free cluster to be allocated.
In a write-once memory card to be used in a digital camera, it is very desirable to have the card be FAT compatible. This way, a memory card can be recognized as a drive by any hosts that are compatible with the FAT file system. In these write-once devices, the normal storage states are represented by 1""s. In rewritable systems, the 1""s are converted to 0""s in the FAT to indicate free cluster space, and programmed back to patterns of 1""s and 0""s to represent the file cluster locations. However, this approach presents a serious problem when applied to write-once devices. In write-once or one-time programmable devices that have an unprogrammed state of 1""s, the entire FAT and root directory must be written at once to program the file cluster locations and to zero out the 1""s in the unallocated clusters and unused space. The FAT and root directory therefore can only be programmed once.
In addition, in write-once or one-time programmable devices that have an unprogrammed state of 1""s, the entire FAT and root directory must be written at once if any of the previously written data need to be modified. The FAT and root directory can never be overwritten. As a result, moving a file presents a problem, since if a file is moved, new FAT clusters need to be allocated and the old ones zeroed out so they are available. Similarly, renaming a file presents a problem, since the root directory 32 byte entry for this file name needs to change. Deleting a file presents a problem, since the root directory 32 byte entry for this file name needs to change and the FAT clusters need to be zeroed out.
Some optical disc recording technologies, such as CD-R (recordable compact disc) are one-time programmable (OTP), so that once an area of the disc has been recorded, it cannot be erased. In order to record files on such a CD-R, a special software driver is required. The driver resides on the host computer, in order to convert the non-DOS file system used by the CD-R into a format, which appears to be DOS, to application software running on the host computer. Unfortunately, this requires each host computer to have a special software driver to support the non-DOS file system.
It is an object of the present invention to provide an improved method of revising and retrieving data files stored on a one-time programmable memory.
Another object of the present invention is to provide a way for enabling OTP media, particularly OTP solid state memory, to appear as a DOS compatible disk drive to the host computer.
These objects are achieved by a method for a host computer to access digital files stored in a memory card having a controller and a one-time programmable memory, comprising the steps of:
a) programming the one-time programmable memory to have a first storage allocation table, one or more data files identified by the storage allocation table, and a translation table;
b) the host computer requesting the storage allocation table of the memory card;
c) the controller using the translator table to identify the physical location of the first storage allocation table and returning such storage allocation table to the host computer for subsequent accessing of the data files;
d) modifying at least one of the data files and providing a second storage allocation table, different from the first storage allocation table, and amending the translator table to indicate the location of the second storage allocation table;
e) repeating step b); and
f) the controller using the amended translator table to identify the physical location of the second storage allocation table and returning such second storage allocation table to the host computer for subsequent accessing of the modified data files.
It is an advantage of the present invention that a memory card having one-time programmable memory can be continuously compatible with a host device accessing said cards using the DOS-FAT file system, even if some of the files on the memory card are deleted, renamed, or moved.